home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / Windows & Frames / window-opener-java.izs < prev    next >
Text File  |  2005-07-29  |  2KB  |  53 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>adapt2screen Window opener (Requires Java-enabled browser)
  4. <!/TITLE>
  5.  
  6. <!DESCRIPTION>A script that opens a secondary window with the size adjusted relative to the screen resolution of the surfer. You can specify, for example, that the secondary window always be 50 pixels smaller than the screen of the surfer, regardless of the screen size of the surfer. 
  7. <!/DESCRIPTION> 
  8.  
  9. <!CATEGORY>windows, remotes, frames<!/CATEGORY>
  10.  
  11. <!SCRIPT>
  12. <!-- START OF SCRIPT -->
  13. <SCRIPT>
  14. if (navigator.javaEnabled()) {
  15. var toolkit = java.awt.Toolkit.getDefaultToolkit();
  16. var screen_size = toolkit.getScreenSize();
  17. w = screen_size.width;
  18. h = screen_size.height;
  19. }
  20. w=w-50; //erase these adjustments for making the window big as possible
  21. h=h-150;
  22. //change index.html to the name of the window U want to open
  23. nw=window.open("../index.html","",'toolbar=yes,location=yes,directories=yes,menubar =yes,scrollbars=yes,status=yes,resizable=1,width='+w+',height='+h)
  24. if (document.layers||document.all)
  25. window.nw.moveTo(0,0) //up-left-justify
  26. </SCRIPT>
  27.  
  28.  
  29. <!-- END OF SCRIPT -->
  30. <!/SCRIPT>
  31.  
  32. <!PREVIEW>
  33. <!-- START OF SCRIPT -->
  34. <SCRIPT>
  35. if (navigator.javaEnabled()) {
  36. var toolkit = java.awt.Toolkit.getDefaultToolkit();
  37. var screen_size = toolkit.getScreenSize();
  38. w = screen_size.width;
  39. h = screen_size.height;
  40. }
  41. w=w-50; //erase these adjustments for making the window big as possible
  42. h=h-150;
  43. //change index.html to the name of the window U want to open
  44. nw=window.open("../index.html","",'toolbar=yes,location=yes,directories=yes,menubar =yes,scrollbars=yes,status=yes,resizable=1,width='+w+',height='+h)
  45. if (document.layers||document.all)
  46. window.nw.moveTo(0,0) //up-left-justify
  47. </SCRIPT>
  48.  
  49.  
  50. <!-- END OF SCRIPT -->
  51. <!/PREVIEW>
  52.  
  53. <!RELATED>NONE<!/RELATED>